package br.com.massai.model.entity.file;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "LANCAMENTO_FILE")
public class LancamentoFile implements Serializable {

	private static final long serialVersionUID = 5812713964732394730L;

	@Id
	@SequenceGenerator(name = "seqLancamentoFile", sequenceName = "seq_lancamento_file", allocationSize = 1)
	@GeneratedValue(generator = "seqLancamentoFile", strategy = GenerationType.SEQUENCE)
	private Long id;

	@Column(name = "BUDGETITEM_CDREFERENCIA", length = 20, columnDefinition = "VARCHAR(20)")
	private String budgetItemCdReferencia;

	@Column(name = "BUDGETITEM_DEPLANILHA", columnDefinition = "TEXT")
	private String budgetItemDePlanilha;

	@Column(name = "VALOR_LIQUIDO", precision = 10, scale = 2, columnDefinition = "NUMERIC(10,2) DEFAULT 0.00")
	private BigDecimal valorLiquido;

	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@JoinColumn(name = "EMPREGADO_FILE_ID", referencedColumnName = "ID")
	private EmpregadoFile empregadoFile;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getBudgetItemCdReferencia() {
		return budgetItemCdReferencia;
	}

	public void setBudgetItemCdReferencia(String budgetItemCdReferencia) {
		this.budgetItemCdReferencia = budgetItemCdReferencia;
	}

	public String getBudgetItemDePlanilha() {
		return budgetItemDePlanilha;
	}

	public void setBudgetItemDePlanilha(String budgetItemDePlanilha) {
		this.budgetItemDePlanilha = budgetItemDePlanilha;
	}

	public BigDecimal getValorLiquido() {
		return valorLiquido;
	}

	public void setValorLiquido(BigDecimal valorLiquido) {
		this.valorLiquido = valorLiquido;
	}

	public EmpregadoFile getEmpregadoFile() {
		return empregadoFile;
	}

	public void setEmpregadoFile(EmpregadoFile empregadoFile) {
		this.empregadoFile = empregadoFile;
	}
}